<template>
  <div class="container">
    <div class="title">会员信息</div>
    <div class="items">
      <div class="item">
        <div class="circle-container">
          <svg class="progress-ring" width="100" height="100" viewBox="0 0 100 100">
            <circle
              class="progress-ring__circle"
              stroke="rgba(115, 192, 222, 0.3)"
              stroke-width="8"
              fill="transparent"
              r="42"
              cx="50"
              cy="50"
            />
            <circle
              class="progress-ring__circle progress-ring__circle--inner"
              stroke="#73C0DE"
              stroke-width="8"
              fill="transparent"
              r="42"
              cx="50"
              cy="50"
              stroke-dasharray="264"
              stroke-dashoffset="0"
            />
          </svg>
          <div class="number-inside">{{ todayNew }}</div>
        </div>
        <div class="label">今日新增</div>
      </div>
      <div class="item">
        <div class="circle-container">
          <svg class="progress-ring" width="100" height="100" viewBox="0 0 100 100">
            <circle
              class="progress-ring__circle"
              stroke="rgba(237, 102, 102, 0.3)"
              stroke-width="8"
              fill="transparent"
              r="42"
              cx="50"
              cy="50"
            />
            <circle
              class="progress-ring__circle progress-ring__circle--inner"
              stroke="#ED6666"
              stroke-width="8"
              fill="transparent"
              r="42"
              cx="50"
              cy="50"
              stroke-dasharray="264"
              stroke-dashoffset="0"
            />
          </svg>
          <div class="number-inside">{{ yesterdayNew }}</div>
        </div>
        <div class="label">昨日新增</div>
      </div>
      <div class="item">
        <div class="circle-container">
          <svg class="progress-ring" width="100" height="100" viewBox="0 0 100 100">
            <circle
              class="progress-ring__circle"
              stroke="rgba(46, 199, 201, 0.3)"
              stroke-width="8"
              fill="transparent"
              r="42"
              cx="50"
              cy="50"
            />
            <circle
              class="progress-ring__circle progress-ring__circle--inner"
              stroke="#2EC7C9"
              stroke-width="8"
              fill="transparent"
              r="42"
              cx="50"
              cy="50"
              stroke-dasharray="264"
              stroke-dashoffset="0"
            />
          </svg>
          <div class="number-inside">{{ total }}</div>
        </div>
        <div class="label">总数</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SiteOverview',
  data() {
    return {
      todayNew: 226,
      yesterdayNew: 446,
      total: 7208,
    };
  },
};
</script>

<style scoped>
.container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: transparent;
  padding: 20px;
  box-sizing: border-box;
}

.title {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: #36C4FF;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  padding-bottom: 4px;
  z-index: 1;
}

.items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 60px;
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.circle-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  stroke-linecap: round;
  transform-origin: center;
}

.number-inside {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
  z-index: 2;
}

.label {
  font-size: 16px;
  color: #cccccc;
  margin-top: 10px;
  font-family: 'Arial', sans-serif;
}
</style>